home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / graphsv3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-01-30  |  22.6 KB  |  737 lines

  1. unit graphsv3;
  2.  
  3. { Pinnacle-BPS Graph Control }
  4. { Version 1.0 }
  5.  
  6. { Conversion log:
  7. Error: 'Label' is a reserved word. _DGraph.Label changed to 'Label' is a reserved word_
  8.  }
  9.  
  10. interface
  11.  
  12. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  13.  
  14. const
  15.   LIBID_GraphLib: TGUID = '{0842D103-1E19-101B-9AAF-1A1626551E7C}';
  16.  
  17. const
  18.  
  19. { AutoInc constants. }
  20.  
  21. { AutoIncConstants }
  22.  
  23.   gphOff = 0;
  24.   gphOn = 1;
  25.  
  26. { Background constants. }
  27.  
  28. { BackgroundConstants }
  29.  
  30.   gphBlack = 0;
  31.   gphBlue = 1;
  32.   gphGreen = 2;
  33.   gphCyan = 3;
  34.   gphRed = 4;
  35.   gphMagenta = 5;
  36.   gphBrown = 6;
  37.   gphLightGray = 7;
  38.   gphDarkGray = 8;
  39.   gphLightBlue = 9;
  40.   gphLightGreen = 10;
  41.   gphLightCyan = 11;
  42.   gphLightRed = 12;
  43.   gphLightMagenta = 13;
  44.   gphYellow = 14;
  45.   gphWhite = 15;
  46.  
  47. { ColorData constants. }
  48.  
  49. { ColorDataConstants }
  50.  
  51. //gphBlack = 0;
  52. //gphBlue = 1;
  53. //gphGreen = 2;
  54. //gphCyan = 3;
  55. //gphRed = 4;
  56. //gphMagenta = 5;
  57. //gphBrown = 6;
  58. //gphLightGray = 7;
  59. //gphDarkGray = 8;
  60. //gphLightBlue = 9;
  61. //gphLightGreen = 10;
  62. //gphLightCyan = 11;
  63. //gphLightRed = 12;
  64. //gphLightMagenta = 13;
  65. //gphYellow = 14;
  66. //gphWhite = 15;
  67.  
  68. { DataReset constants. }
  69.  
  70. { DataResetConstants }
  71.  
  72.   gphNone = 0;
  73.   gphGraphData = 1;
  74.   gphColorData = 2;
  75.   gphExtraData = 3;
  76.   gphLabelText = 4;
  77.   gphLegendText = 5;
  78.   gphPatternData = 6;
  79.   gphSymbolData = 7;
  80.   gphXPosData = 8;
  81.   gphAllData = 9;
  82.   gphFontInfo = 10;
  83.  
  84. { DrawMode constants. }
  85.  
  86. { DrawModeConstants }
  87.  
  88.   gphNoAction = 0;
  89.   gphClear = 1;
  90.   gphDraw = 2;
  91.   gphBlit = 3;
  92.   gphCopy = 4;
  93.   gphPrint = 5;
  94.   gphWrite = 6;
  95.  
  96. { DrawStyle constants. }
  97.  
  98. { DrawStyleConstants }
  99.  
  100.   gphMonochrome = 0;
  101.   gphColor = 1;
  102.  
  103. { FontFamily constants. }
  104.  
  105. { FontFamilyConstants }
  106.  
  107.   gphRoman = 0;
  108.   gphSwiss = 1;
  109.   gphModern = 2;
  110.  
  111. { FontStyle constants. }
  112.  
  113. { FontStyleConstants }
  114.  
  115.   gphDefault = 0;
  116.   gphItalic = 1;
  117.   gphBold = 2;
  118.   gphBoldItalic = 3;
  119.   gphUnderlined = 4;
  120.   gphUnderlinedItalic = 5;
  121.   gphUnderlinedBold = 6;
  122.   gphUnderlinedBoldItalic = 7;
  123.  
  124. { FontUse constants. }
  125.  
  126. { FontUseConstants }
  127.  
  128.   gphGraphTitle = 0;
  129.   gphOtherTitles = 1;
  130.   gphLabels = 2;
  131.   gphLegend = 3;
  132.   gphAllText = 4;
  133.  
  134. { Foreground constants. }
  135.  
  136. { ForegroundConstants }
  137.  
  138. //gphBlack = 0;
  139. //gphBlue = 1;
  140. //gphGreen = 2;
  141. //gphCyan = 3;
  142. //gphRed = 4;
  143. //gphMagenta = 5;
  144. //gphBrown = 6;
  145. //gphLightGray = 7;
  146. //gphDarkGray = 8;
  147. //gphLightBlue = 9;
  148. //gphLightGreen = 10;
  149. //gphLightCyan = 11;
  150. //gphLightRed = 12;
  151. //gphLightMagenta = 13;
  152. //gphYellow = 14;
  153. //gphWhite = 15;
  154.   gphAutoBlackWhite = 16;
  155.  
  156. { GraphType constants. }
  157.  
  158. { GraphTypeConstants }
  159.  
  160. //gphNone = 0;
  161.   gphPie2D = 1;
  162.   gphPie3D = 2;
  163.   gphBar2D = 3;
  164.   gphBar3D = 4;
  165.   gphGantt = 5;
  166.   gphLine = 6;
  167.   gphLogLin = 7;
  168.   gphArea = 8;
  169.   gphScatter = 9;
  170.   gphPolar = 10;
  171.   gphHLC = 11;
  172.  
  173. { GridStyle constants. }
  174.  
  175. { GridStyleConstants }
  176.  
  177. //gphNone = 0;
  178.   gphHorizontal = 1;
  179.   gphVertical = 2;
  180.   gphBoth = 3;
  181.  
  182. { IndexStyle constants. }
  183.  
  184. { IndexStyleConstants }
  185.  
  186.   gphStandard = 0;
  187.   gphEnhanced = 1;
  188.  
  189. { Labels constants. }
  190.  
  191. { LabelsConstants }
  192.  
  193. //gphOff = 0;
  194. //gphOn = 1;
  195.   gphXAxisLabelsOnly = 2;
  196.   gphYAxisLabelsOnly = 3;
  197.  
  198. { LegendStyle constants. }
  199.  
  200. { LegendStyleConstants }
  201.  
  202. //gphMonochrome = 0;
  203. //gphColor = 1;
  204.  
  205. { LineStats constants. }
  206.  
  207. { LineStatsConstants }
  208.  
  209. //gphNone = 0;
  210.   gphMean = 1;
  211.   gphMinmax = 2;
  212.   gphMeanMinmax = 3;
  213.   gphStddev = 4;
  214.   gphStddevMean = 5;
  215.   gphStddevMinmax = 6;
  216.   gphStddevMinmaxMean = 7;
  217.   gphBestfit = 8;
  218.   gphBestfitMean = 9;
  219.   gphBestfitMinmax = 10;
  220.   gphBestfitMinmaxMean = 11;
  221.   gphBestfitStddev = 12;
  222.   gphBestfitStddevMean = 13;
  223.   gphBestfitStddevMinmax = 14;
  224.   gphAll = 15;
  225.  
  226. { Palette constants. }
  227.  
  228. { PaletteConstants }
  229.  
  230. //gphDefault = 0;
  231.   gphPastel = 1;
  232.   gphGrayscale = 2;
  233.  
  234. { PatternLines constants. }
  235.  
  236. { PatternedLinesConstants }
  237.  
  238.   gphPatternOff = 0;
  239.   gphPatternOn = 1;
  240.  
  241. { PrintSyle constants. }
  242.  
  243. { PrintStyleConstants }
  244.  
  245. //gphMonochrome = 0;
  246. //gphColor = 1;
  247.   gphMonochromeWithBorder = 2;
  248.   gphColorWithBorder = 3;
  249.  
  250. { RandomData constants. }
  251.  
  252. { RandomDataConstants }
  253.  
  254. //gphOff = 0;
  255. //gphOn = 1;
  256.  
  257. { SymbolData constants. }
  258.  
  259. { SymbolDataConstants }
  260.  
  261.   gphCrossPlus = 0;
  262.   gphCrossTimes = 1;
  263.   gphTriangleUp = 2;
  264.   gphSolidTriangleUp = 3;
  265.   gphTriangleDown = 4;
  266.   gphSolidTriangleDown = 5;
  267.   gphSquare = 6;
  268.   gphSolidSquare = 7;
  269.   gphDiamond = 8;
  270.   gphSolidDiamond = 9;
  271.  
  272. { ThickLines constants. }
  273.  
  274. { ThickLinesConstants }
  275.  
  276.   gphLinesOff = 0;
  277.   gphLinesOn = 1;
  278.  
  279. { Ticks constants. }
  280.  
  281. { TicksConstants }
  282.  
  283.   gphTicksOff = 0;
  284.   gphTicksOn = 1;
  285.   gphXAxisTicksOnly = 2;
  286.   gphYAxisTicksOnly = 3;
  287.  
  288. { YAxisPos constants. }
  289.  
  290. { YAxisPosConstants }
  291.  
  292. //gphDefault = 0;
  293.   gphAlignLeft = 1;
  294.   gphAlignRight = 2;
  295.  
  296. { YAxisStyle constants. }
  297.  
  298. { YAxisStyleConstants }
  299.  
  300. //gphDefault = 0;
  301.   gphVariableOrigin = 1;
  302.   gphUserDefined = 2;
  303.  
  304. { BorderStyle constants. }
  305.  
  306. { BorderStyleConstants }
  307.  
  308. //gphNone = 0;
  309.   gphFixedSingle = 1;
  310.  
  311. const
  312.  
  313. { Component class GUIDs }
  314.   Class_Graph: TGUID = '{0842D100-1E19-101B-9AAF-1A1626551E7C}';
  315.  
  316. type
  317.  
  318. { Forward declarations }
  319.   _DGraph = dispinterface;
  320.   _DGraphEvents = dispinterface;
  321.  
  322.   AutoIncConstants = TOleEnum;
  323.   BackgroundConstants = TOleEnum;
  324.   ColorDataConstants = TOleEnum;
  325.   DataResetConstants = TOleEnum;
  326.   DrawModeConstants = TOleEnum;
  327.   DrawStyleConstants = TOleEnum;
  328.   FontFamilyConstants = TOleEnum;
  329.   FontStyleConstants = TOleEnum;
  330.   FontUseConstants = TOleEnum;
  331.   ForegroundConstants = TOleEnum;
  332.   GraphTypeConstants = TOleEnum;
  333.   GridStyleConstants = TOleEnum;
  334.   IndexStyleConstants = TOleEnum;
  335.   LabelsConstants = TOleEnum;
  336.   LegendStyleConstants = TOleEnum;
  337.   LineStatsConstants = TOleEnum;
  338.   PaletteConstants = TOleEnum;
  339.   PatternedLinesConstants = TOleEnum;
  340.   PrintStyleConstants = TOleEnum;
  341.   RandomDataConstants = TOleEnum;
  342.   SymbolDataConstants = TOleEnum;
  343.   ThickLinesConstants = TOleEnum;
  344.   TicksConstants = TOleEnum;
  345.   YAxisPosConstants = TOleEnum;
  346.   YAxisStyleConstants = TOleEnum;
  347.   BorderStyleConstants = TOleEnum;
  348.  
  349.   _DGraph = dispinterface
  350.     ['{0842D101-1E19-101B-9AAF-1A1626551E7C}']
  351.     property AutoInc: AutoIncConstants dispid 1;
  352.     property Background: BackgroundConstants dispid 2;
  353.     property BottomTitle: WideString dispid 3;
  354.     property ColorData: ColorDataConstants dispid 4;
  355.     property CtlVersion: WideString dispid 5;
  356.     property DataReset: DataResetConstants dispid 6;
  357.     property DrawMode: DrawModeConstants dispid 7;
  358.     property DrawStyle: DrawStyleConstants dispid 8;
  359.     property ExtraData: Smallint dispid 9;
  360.     property FontFamily: FontFamilyConstants dispid 10;
  361.     property FontSize: Smallint dispid 11;
  362.     property FontStyle: FontStyleConstants dispid 12;
  363.     property FontUse: FontUseConstants dispid 13;
  364.     property Foreground: ForegroundConstants dispid 14;
  365.     property GraphCaption: WideString dispid 15;
  366.     property GraphData: Single dispid 16;
  367.     property GraphStyle: Smallint dispid 17;
  368.     property GraphTitle: WideString dispid 18;
  369.     property GraphType: GraphTypeConstants dispid 19;
  370.     property GridStyle: GridStyleConstants dispid 20;
  371.     property ImageFile: WideString dispid 21;
  372.     property IndexStyle: IndexStyleConstants dispid 22;
  373.     property LabelEvery: Smallint dispid 23;
  374.     property Labels: LabelsConstants dispid 24;
  375.     property LabelText: WideString dispid 25;
  376.     property LeftTitle: WideString dispid 26;
  377.     property LegendStyle: LegendStyleConstants dispid 27;
  378.     property LegendText: WideString dispid 28;
  379.     property LineStats: LineStatsConstants dispid 29;
  380.     property NumPoints: Smallint dispid 30;
  381.     property NumSets: Smallint dispid 31;
  382.     property Palette: PaletteConstants dispid 32;
  383.     property PatternData: Smallint dispid 33;
  384.     property PatternedLines: PatternedLinesConstants dispid 34;
  385.     property Picture: IPictureDisp dispid 35;
  386.     property PrintStyle: PrintStyleConstants dispid 36;
  387.     property QuickData: WideString dispid 37;
  388.     property RandomData: RandomDataConstants dispid 38;
  389.     property SeeThru: Smallint dispid 39;
  390.     property SymbolData: SymbolDataConstants dispid 40;
  391.     property ThickLines: ThickLinesConstants dispid 41;
  392.     property ThisPoint: Smallint dispid 42;
  393.     property ThisSet: Smallint dispid 43;
  394.     property TickEvery: Smallint dispid 44;
  395.     property Ticks: TicksConstants dispid 45;
  396.     property XPosData: Single dispid 46;
  397.     property YAxisMax: Single dispid 47;
  398.     property YAxisMin: Single dispid 48;
  399.     property YAxisPos: YAxisPosConstants dispid 49;
  400.     property YAxisStyle: YAxisStyleConstants dispid 50;
  401.     property YAxisTicks: Smallint dispid 51;
  402.     property Enabled: WordBool dispid -514;
  403.     property BorderStyle: BorderStyleConstants dispid -504;
  404.     property hWnd: OLE_HANDLE dispid -515;
  405.     property _QuickData: WideString dispid 0;
  406.     property Color[index: Smallint]: Smallint dispid 52;
  407.     property Data[index: Smallint]: Single dispid 53;
  408.     property Extra[index: Smallint]: Smallint dispid 54;
  409.     property FFamily[index: Smallint]: Smallint dispid 55;
  410.     property FSize[index: Smallint]: Smallint dispid 56;
  411.     property FStyle[index: Smallint]: Smallint dispid 57;
  412.     property Label_[index: Smallint]: WideString dispid 58;
  413.     property Legend[index: Smallint]: WideString dispid 59;
  414.     property Pattern[index: Smallint]: Smallint dispid 60;
  415.     property Symbol[index: Smallint]: Smallint dispid 61;
  416.     property XPos[index: Smallint]: Single dispid 62;
  417.     procedure Refresh; dispid -550;
  418.     procedure AboutBox; dispid -552;
  419.   end;
  420.  
  421.   _DGraphEvents = dispinterface
  422.     ['{0842D102-1E19-101B-9AAF-1A1626551E7C}']
  423.     procedure Click; dispid -600;
  424.     procedure DblClick; dispid -601;
  425.     procedure KeyDown(var  {IDL_None} KeyCode: Smallint; Shift: Smallint); dispid -602;
  426.     procedure KeyPress(var  {IDL_None} KeyAscii: Smallint); dispid -603;
  427.     procedure KeyUp(var  {IDL_None} KeyCode: Smallint; Shift: Smallint); dispid -604;
  428.     procedure MouseDown(Button, Shift: Smallint; X: OLE_XPOS_PIXELS; Y: OLE_YPOS_PIXELS); dispid -605;
  429.     procedure MouseMove(Button, Shift: Smallint; X: OLE_XPOS_PIXELS; Y: OLE_YPOS_PIXELS); dispid -606;
  430.     procedure MouseUp(Button, Shift: Smallint; X: OLE_XPOS_PIXELS; Y: OLE_YPOS_PIXELS); dispid -607;
  431.   end;
  432.  
  433. { Pinnacle-BPS Graph Control }
  434.  
  435.   TGraph = class(TOleControl)
  436.   private
  437.     FIntf: _DGraph;
  438.     function Get_Picture: IPictureDisp;
  439.     procedure Set_Picture(var Value: IPictureDisp);
  440.     function Get_hWnd: OLE_HANDLE;
  441.     procedure Set_hWnd(var Value: OLE_HANDLE);
  442.     function Get_Color(index: Smallint): Smallint;
  443.     procedure Set_Color(index: Smallint; Value: Smallint);
  444.     function Get_Data(index: Smallint): Single;
  445.     procedure Set_Data(index: Smallint; Value: Single);
  446.     function Get_Extra(index: Smallint): Smallint;
  447.     procedure Set_Extra(index: Smallint; Value: Smallint);
  448.     function Get_FFamily(index: Smallint): Smallint;
  449.     procedure Set_FFamily(index: Smallint; Value: Smallint);
  450.     function Get_FSize(index: Smallint): Smallint;
  451.     procedure Set_FSize(index: Smallint; Value: Smallint);
  452.     function Get_FStyle(index: Smallint): Smallint;
  453.     procedure Set_FStyle(index: Smallint; Value: Smallint);
  454.     function Get_Label_(index: Smallint): WideString;
  455.     procedure Set_Label_(index: Smallint; const Value: WideString);
  456.     function Get_Legend(index: Smallint): WideString;
  457.     procedure Set_Legend(index: Smallint; const Value: WideString);
  458.     function Get_Pattern(index: Smallint): Smallint;
  459.     procedure Set_Pattern(index: Smallint; Value: Smallint);
  460.     function Get_Symbol(index: Smallint): Smallint;
  461.     procedure Set_Symbol(index: Smallint; Value: Smallint);
  462.     function Get_XPos(index: Smallint): Single;
  463.     procedure Set_XPos(index: Smallint; Value: Single);
  464.   protected
  465.     procedure InitControlData; override;
  466.     procedure InitControlInterface(const Obj: IUnknown); override;
  467.   public
  468.     procedure Refresh;
  469.     procedure AboutBox;
  470.     property ControlInterface: _DGraph read FIntf;
  471.     property Picture: IPictureDisp read Get_Picture write Set_Picture;
  472.     property QuickData: WideString index 37 read GetWideStringProp write SetWideStringProp;
  473.     property SeeThru: Smallint index 39 read GetSmallintProp write SetSmallintProp;
  474.     property _QuickData: WideString index 0 read GetWideStringProp write SetWideStringProp;
  475.     property Color[index: Smallint]: Smallint read Get_Color write Set_Color;
  476.     property Data[index: Smallint]: Single read Get_Data write Set_Data;
  477.     property Extra[index: Smallint]: Smallint read Get_Extra write Set_Extra;
  478.     property FFamily[index: Smallint]: Smallint read Get_FFamily write Set_FFamily;
  479.     property FSize[index: Smallint]: Smallint read Get_FSize write Set_FSize;
  480.     property FStyle[index: Smallint]: Smallint read Get_FStyle write Set_FStyle;
  481.     property Label_[index: Smallint]: WideString read Get_Label_ write Set_Label_;
  482.     property Legend[index: Smallint]: WideString read Get_Legend write Set_Legend;
  483.     property Pattern[index: Smallint]: Smallint read Get_Pattern write Set_Pattern;
  484.     property Symbol[index: Smallint]: Smallint read Get_Symbol write Set_Symbol;
  485.     property XPos[index: Smallint]: Single read Get_XPos write Set_XPos;
  486.   published
  487.     property TabStop;
  488.     property DragCursor;
  489.     property DragMode;
  490.     property ParentShowHint;
  491.     property PopupMenu;
  492.     property ShowHint;
  493.     property TabOrder;
  494.     property Visible;
  495.     property OnDragDrop;
  496.     property OnDragOver;
  497.     property OnEndDrag;
  498.     property OnEnter;
  499.     property OnExit;
  500.     property OnStartDrag;
  501.     property OnMouseUp;
  502.     property OnMouseMove;
  503.     property OnMouseDown;
  504.     property OnKeyUp;
  505.     property OnKeyPress;
  506.     property OnKeyDown;
  507.     property OnDblClick;
  508.     property OnClick;
  509.     property AutoInc: AutoIncConstants index 1 read GetTOleEnumProp write SetTOleEnumProp stored False;
  510.     property Background: BackgroundConstants index 2 read GetTOleEnumProp write SetTOleEnumProp stored False;
  511.     property BottomTitle: WideString index 3 read GetWideStringProp write SetWideStringProp stored False;
  512.     property ColorData: ColorDataConstants index 4 read GetTOleEnumProp write SetTOleEnumProp stored False;
  513.     property CtlVersion: WideString index 5 read GetWideStringProp write SetWideStringProp stored False;
  514.     property DataReset: DataResetConstants index 6 read GetTOleEnumProp write SetTOleEnumProp stored False;
  515.     property DrawMode: DrawModeConstants index 7 read GetTOleEnumProp write SetTOleEnumProp stored False;
  516.     property DrawStyle: DrawStyleConstants index 8 read GetTOleEnumProp write SetTOleEnumProp stored False;
  517.     property ExtraData: Smallint index 9 read GetSmallintProp write SetSmallintProp stored False;
  518.     property FontFamily: FontFamilyConstants index 10 read GetTOleEnumProp write SetTOleEnumProp stored False;
  519.     property FontSize: Smallint index 11 read GetSmallintProp write SetSmallintProp stored False;
  520.     property FontStyle: FontStyleConstants index 12 read GetTOleEnumProp write SetTOleEnumProp stored False;
  521.     property FontUse: FontUseConstants index 13 read GetTOleEnumProp write SetTOleEnumProp stored False;
  522.     property Foreground: ForegroundConstants index 14 read GetTOleEnumProp write SetTOleEnumProp stored False;
  523.     property GraphCaption: WideString index 15 read GetWideStringProp write SetWideStringProp stored False;
  524.     property GraphData: Single index 16 read GetSingleProp write SetSingleProp stored False;
  525.     property GraphStyle: Smallint index 17 read GetSmallintProp write SetSmallintProp stored False;
  526.     property GraphTitle: WideString index 18 read GetWideStringProp write SetWideStringProp stored False;
  527.     property GraphType: GraphTypeConstants index 19 read GetTOleEnumProp write SetTOleEnumProp stored False;
  528.     property GridStyle: GridStyleConstants index 20 read GetTOleEnumProp write SetTOleEnumProp stored False;
  529.     property ImageFile: WideString index 21 read GetWideStringProp write SetWideStringProp stored False;
  530.     property IndexStyle: IndexStyleConstants index 22 read GetTOleEnumProp write SetTOleEnumProp stored False;
  531.     property LabelEvery: Smallint index 23 read GetSmallintProp write SetSmallintProp stored False;
  532.     property Labels: LabelsConstants index 24 read GetTOleEnumProp write SetTOleEnumProp stored False;
  533.     property LabelText: WideString index 25 read GetWideStringProp write SetWideStringProp stored False;
  534.     property LeftTitle: WideString index 26 read GetWideStringProp write SetWideStringProp stored False;
  535.     property LegendStyle: LegendStyleConstants index 27 read GetTOleEnumProp write SetTOleEnumProp stored False;
  536.     property LegendText: WideString index 28 read GetWideStringProp write SetWideStringProp stored False;
  537.     property LineStats: LineStatsConstants index 29 read GetTOleEnumProp write SetTOleEnumProp stored False;
  538.     property NumPoints: Smallint index 30 read GetSmallintProp write SetSmallintProp stored False;
  539.     property NumSets: Smallint index 31 read GetSmallintProp write SetSmallintProp stored False;
  540.     property Palette: PaletteConstants index 32 read GetTOleEnumProp write SetTOleEnumProp stored False;
  541.     property PatternData: Smallint index 33 read GetSmallintProp write SetSmallintProp stored False;
  542.     property PatternedLines: PatternedLinesConstants index 34 read GetTOleEnumProp write SetTOleEnumProp stored False;
  543.     property PrintStyle: PrintStyleConstants index 36 read GetTOleEnumProp write SetTOleEnumProp stored False;
  544.     property RandomData: RandomDataConstants index 38 read GetTOleEnumProp write SetTOleEnumProp stored False;
  545.     property SymbolData: SymbolDataConstants index 40 read GetTOleEnumProp write SetTOleEnumProp stored False;
  546.     property ThickLines: ThickLinesConstants index 41 read GetTOleEnumProp write SetTOleEnumProp stored False;
  547.     property ThisPoint: Smallint index 42 read GetSmallintProp write SetSmallintProp stored False;
  548.     property ThisSet: Smallint index 43 read GetSmallintProp write SetSmallintProp stored False;
  549.     property TickEvery: Smallint index 44 read GetSmallintProp write SetSmallintProp stored False;
  550.     property Ticks: TicksConstants index 45 read GetTOleEnumProp write SetTOleEnumProp stored False;
  551.     property XPosData: Single index 46 read GetSingleProp write SetSingleProp stored False;
  552.     property YAxisMax: Single index 47 read GetSingleProp write SetSingleProp stored False;
  553.     property YAxisMin: Single index 48 read GetSingleProp write SetSingleProp stored False;
  554.     property YAxisPos: YAxisPosConstants index 49 read GetTOleEnumProp write SetTOleEnumProp stored False;
  555.     property YAxisStyle: YAxisStyleConstants index 50 read GetTOleEnumProp write SetTOleEnumProp stored False;
  556.     property YAxisTicks: Smallint index 51 read GetSmallintProp write SetSmallintProp stored False;
  557.     property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp stored False;
  558.     property BorderStyle: BorderStyleConstants index -504 read GetTOleEnumProp write SetTOleEnumProp stored False;
  559.     property hWnd: OLE_HANDLE read Get_hWnd write Set_hWnd stored False;
  560.   end;
  561.  
  562. procedure Register;
  563.  
  564. implementation
  565.  
  566. uses ComObj;
  567.  
  568. procedure TGraph.InitControlData;
  569. const
  570.   CControlData: TControlData = (
  571.     ClassID: '{0842D100-1E19-101B-9AAF-1A1626551E7C}';
  572.     EventIID: '{0842D102-1E19-101B-9AAF-1A1626551E7C}';
  573.     EventCount: 0;
  574.     EventDispIDs: nil;
  575.     LicenseKey: nil;
  576.     Flags: $00000008;
  577.     Version: 300;
  578.     FontCount: 0;
  579.     FontIDs: nil);
  580. begin
  581.   ControlData := @CControlData;
  582. end;
  583.  
  584. procedure TGraph.InitControlInterface(const Obj: IUnknown);
  585. begin
  586.   FIntf := Obj as _DGraph;
  587. end;
  588.  
  589. procedure TGraph.Refresh;
  590. begin
  591.   ControlInterface.Refresh;
  592. end;
  593.  
  594. procedure TGraph.AboutBox;
  595. begin
  596.   ControlInterface.AboutBox;
  597. end;
  598.  
  599. function TGraph.Get_Picture: IPictureDisp;
  600. begin
  601.   Result := ControlInterface.Picture;
  602. end;
  603.  
  604. procedure TGraph.Set_Picture(var Value: IPictureDisp);
  605. begin
  606.   ControlInterface.Picture := Value;
  607. end;
  608.  
  609. function TGraph.Get_hWnd: OLE_HANDLE;
  610. begin
  611.   Result := ControlInterface.hWnd;
  612. end;
  613.  
  614. procedure TGraph.Set_hWnd(var Value: OLE_HANDLE);
  615. begin
  616.   ControlInterface.hWnd := Value;
  617. end;
  618.  
  619. function TGraph.Get_Color(index: Smallint): Smallint;
  620. begin
  621.   Result := ControlInterface.Color[index];
  622. end;
  623.  
  624. procedure TGraph.Set_Color(index: Smallint; Value: Smallint);
  625. begin
  626.   ControlInterface.Color[index] := Value;
  627. end;
  628.  
  629. function TGraph.Get_Data(index: Smallint): Single;
  630. begin
  631.   Result := ControlInterface.Data[index];
  632. end;
  633.  
  634. procedure TGraph.Set_Data(index: Smallint; Value: Single);
  635. begin
  636.   ControlInterface.Data[index] := Value;
  637. end;
  638.  
  639. function TGraph.Get_Extra(index: Smallint): Smallint;
  640. begin
  641.   Result := ControlInterface.Extra[index];
  642. end;
  643.  
  644. procedure TGraph.Set_Extra(index: Smallint; Value: Smallint);
  645. begin
  646.   ControlInterface.Extra[index] := Value;
  647. end;
  648.  
  649. function TGraph.Get_FFamily(index: Smallint): Smallint;
  650. begin
  651.   Result := ControlInterface.FFamily[index];
  652. end;
  653.  
  654. procedure TGraph.Set_FFamily(index: Smallint; Value: Smallint);
  655. begin
  656.   ControlInterface.FFamily[index] := Value;
  657. end;
  658.  
  659. function TGraph.Get_FSize(index: Smallint): Smallint;
  660. begin
  661.   Result := ControlInterface.FSize[index];
  662. end;
  663.  
  664. procedure TGraph.Set_FSize(index: Smallint; Value: Smallint);
  665. begin
  666.   ControlInterface.FSize[index] := Value;
  667. end;
  668.  
  669. function TGraph.Get_FStyle(index: Smallint): Smallint;
  670. begin
  671.   Result := ControlInterface.FStyle[index];
  672. end;
  673.  
  674. procedure TGraph.Set_FStyle(index: Smallint; Value: Smallint);
  675. begin
  676.   ControlInterface.FStyle[index] := Value;
  677. end;
  678.  
  679. function TGraph.Get_Label_(index: Smallint): WideString;
  680. begin
  681.   Result := ControlInterface.Label_[index];
  682. end;
  683.  
  684. procedure TGraph.Set_Label_(index: Smallint; const Value: WideString);
  685. begin
  686.   ControlInterface.Label_[index] := Value;
  687. end;
  688.  
  689. function TGraph.Get_Legend(index: Smallint): WideString;
  690. begin
  691.   Result := ControlInterface.Legend[index];
  692. end;
  693.  
  694. procedure TGraph.Set_Legend(index: Smallint; const Value: WideString);
  695. begin
  696.   ControlInterface.Legend[index] := Value;
  697. end;
  698.  
  699. function TGraph.Get_Pattern(index: Smallint): Smallint;
  700. begin
  701.   Result := ControlInterface.Pattern[index];
  702. end;
  703.  
  704. procedure TGraph.Set_Pattern(index: Smallint; Value: Smallint);
  705. begin
  706.   ControlInterface.Pattern[index] := Value;
  707. end;
  708.  
  709. function TGraph.Get_Symbol(index: Smallint): Smallint;
  710. begin
  711.   Result := ControlInterface.Symbol[index];
  712. end;
  713.  
  714. procedure TGraph.Set_Symbol(index: Smallint; Value: Smallint);
  715. begin
  716.   ControlInterface.Symbol[index] := Value;
  717. end;
  718.  
  719. function TGraph.Get_XPos(index: Smallint): Single;
  720. begin
  721.   Result := ControlInterface.XPos[index];
  722. end;
  723.  
  724. procedure TGraph.Set_XPos(index: Smallint; Value: Single);
  725. begin
  726.   ControlInterface.XPos[index] := Value;
  727. end;
  728.  
  729.  
  730. procedure Register;
  731. begin
  732.   RegisterComponents('ActiveX', [TGraph]);
  733.   RegisterNonActiveX([TGraph]);
  734. end;
  735.  
  736. end.
  737.